import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:path/path.dart';
import 'package:read_flutter/common/BookUtils.dart';
import 'package:read_flutter/common/Models.dart';
import 'package:read_flutter/pages/bookshelf_page.dart';
import 'package:read_flutter/pages/search_page.dart';
import 'package:scoped_model/scoped_model.dart';
import 'package:sqflite/sqflite.dart';

void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.

  ReadApiModels ram = ReadApiModels();

  @override
  Widget build(BuildContext context) {
//    debugPaintSizeEnabled = true; //打开视觉调试开关
    // TODO: implement build
    return ScopedModel<ReadApiModels>(
        model: ram,
        child: MaterialApp(
          theme: ThemeData(textTheme: TextTheme()),
          title: '悦读',
          routes: <String, WidgetBuilder>{
            '/SHELF': (BuildContext context) => BookShelf_Page(),
            '/SEARCH': (BuildContext context) => SearchPage(),
          },
          home: BookShelf_Page(),
        ));
  }
}
